package cn.homework.mvcboot.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@Validated
public class UserArticleDTO {

    @ApiModelProperty(value = "标题",required = true)
    @NotBlank(message = "标题不能为空")
    @Size(min=1, max = 20,message = "标题长度在1到20之间")
    private String title;


    @ApiModelProperty(value = "内容",required = true)
    @NotBlank
    @Size(min=20, max = 1000,message = "内容长度在20到1000之间")
    private String content;
}
